
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<style type="text/css">
.title {
	margin-top: 5px;
	font-family: 微软雅黑;
	font-size: 25px;
	line-height: 30px;
	font-weight: bold;
}
.xgg_date{
	font-size: 14px;
	color: #888;
}
.content{
	font-size: 18px;
	line-height: 26px;
	letter-spacing:1px;
}

.contain {
	margin-top: 10px;
	margin-left: 8px;
	margin-right: 8px;
	font-family: 微软雅黑;
	font-size: 16px;
	margin-bottom: 60px;
}

.tel, .address {
	width: 100%;
	line-height: 25px;
	font-size: 16px;
	font-family: 微软雅黑;
}

.contcontain {
	margin-top: 10px;
}

.image {
	margin-top: 10px;
	width: 100%;
}

.imagesize {
	margin-top: 5px;
	width: 100%;
}

.address {
	position: relative;
	width: 100%;
	height:40px;
	text-indent: 0px;
	line-height: 40px;
	margin-top: 20px;
	color: #888;
	overflow: hidden;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
}


.tel {
	position: absolute;
	right: 0px;
	top: 0px;
	width: 40px;
	line-height: 40px;
	border-left: 1px solid #eee;
}

.phone {
	margin-left: 8px;
	margin-top: 8px;
	width: 24px;
	height: 24px;
	text-align: center;
}
</style>
</head>
<body>
	<div class="contain">
		<div id="contain"></div>
		<div class="title" id="title" >${info.data.title}</div>
		<div class="xgg_date" id="xgg_date">时间:${date}</div>
		<div class="contcontain">
			<div class="content" id="content">${info.data.content}</div>
			<div id="image_container">
			<!-- <img class="imagesize" id="image" src="http://47.94.166.156:8080/adlet/upload/icon/52.png" id="adimg" /> -->
		    <c:forEach items="${photes}" var="photo" varStatus="status">
					<img class="imagesize" src="${serverUrl}${photo}" id="image${ status.index }" onclick="fnCheckImage(this);" />
			</c:forEach>
			</div>
		</div>
		<div class="address"> 
			<span class="address_detail" id="address" >地址:${info.data.address}</span>
			<div class="tel">
				<a id="telnum" href="tel:${info.data.tel}"><img class="phone" src="../image/phone.png"></a>
			</div>
		</div>
	</div>
</body>

<script type="text/javascript" src="../js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="../js/constantValue.js"></script>
<script type="text/javascript">

    var images;
	var serverUrl="<%=request.getAttribute("serverUrl")%>";
	
	//加载完页面即执行
	$(function(){
		var imagestr="<%=request.getAttribute("photoStr")%>";
		images=imagestr.split(",");
		for(var i=0;i<images.length;i++){
			images[i]=serverUrl+images[i];
		}
	});
	
	//判断是那种设备并执行相应的接口
	function fnCheckImage(one) {
		var imageIndex=one.id.split("");
	    var u = navigator.userAgent, app = navigator.appVersion;
	    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android
	    var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
	    if (isAndroid) {
	        Android.checkImages(images,imageIndex[imageIndex.length-1]);
	    }
	    if (isIOS) {
	    	window.webkit.messageHandlers.appModel.postMessage({"photos":images,"imageIndex":imageIndex[imageIndex.length-1]});
	    }
	} 
	
</script>
</html>